home *** CD-ROM | disk | FTP | other *** search
/ All for Cell Phones: Sony Ericsson / Sony-Ericsson 2004.iso / Java / AtomicClock / AtomicClock.jar / AtomicClock$a.class (.txt) < prev    next >
Encoding:
Java Class File  |  2002-08-28  |  3.6 KB  |  153 lines

  1. import AtomicClock.c;
  2. import java.io.InputStream;
  3. import javax.microedition.io.Connector;
  4. import javax.microedition.io.StreamConnection;
  5.  
  6. class AtomicClock$a extends Thread {
  7.    // $FF: renamed from: if javax.microedition.io.StreamConnection
  8.    private StreamConnection field_0;
  9.    // $FF: renamed from: try java.io.InputStream
  10.    private InputStream field_1;
  11.    // $FF: renamed from: for java.lang.StringBuffer
  12.    private StringBuffer field_2;
  13.    // $FF: renamed from: case boolean
  14.    private boolean field_3;
  15.    // $FF: renamed from: int boolean
  16.    private boolean field_4;
  17.    // $FF: renamed from: a int
  18.    private int field_5;
  19.    // $FF: renamed from: new int
  20.    private int field_6;
  21.    // $FF: renamed from: do java.lang.String
  22.    private String field_7;
  23.    // $FF: renamed from: byte boolean
  24.    private boolean field_8;
  25.    // $FF: synthetic field
  26.    private final AtomicClock this$0;
  27.  
  28.    AtomicClock$a(AtomicClock var1) {
  29.       this.this$0 = var1;
  30.       this.field_0 = null;
  31.       this.field_1 = null;
  32.       this.field_2 = new StringBuffer();
  33.       this.field_3 = true;
  34.       this.field_4 = false;
  35.       this.field_8 = false;
  36.    }
  37.  
  38.    public synchronized void run() {
  39.       while(this.field_3) {
  40.          try {
  41.             this.wait();
  42.          } catch (Exception var2) {
  43.             this.this$0.a("Problem in Connect wait\n" + var2);
  44.          }
  45.  
  46.          if (this.field_3) {
  47.             this.method_0();
  48.          }
  49.       }
  50.  
  51.    }
  52.  
  53.    // $FF: renamed from: do () void
  54.    private void method_0() {
  55.       try {
  56.          this.field_0 = (StreamConnection)Connector.open("http://www.zeroindex.co.uk/apps/clock/clock.php");
  57.          this.field_1 = this.field_0.openInputStream();
  58.          this.field_6 = 0;
  59.          AtomicClock.access$1200().setText("Downloading");
  60.  
  61.          while((this.field_5 = this.field_1.read()) != -1) {
  62.             this.field_2.append((char)this.field_5);
  63.             ++this.field_6;
  64.          }
  65.  
  66.          this.field_1.close();
  67.          this.field_0.close();
  68.       } catch (Exception var3) {
  69.          this.this$0.a("Connection interrupted");
  70.          this.field_4 = true;
  71.       }
  72.  
  73.       if (!this.field_4) {
  74.          this.field_7 = this.field_2.toString();
  75.          this.field_2 = new StringBuffer();
  76.  
  77.          try {
  78.             AtomicClock.access$602(this.field_7);
  79.             AtomicClock.access$702(Integer.parseInt(AtomicClock.access$600().substring(0, 2)));
  80.             AtomicClock.access$902(Integer.parseInt(AtomicClock.access$600().substring(3, 5)));
  81.             AtomicClock.access$1002(Integer.parseInt(AtomicClock.access$600().substring(6, 8)));
  82.             AtomicClock.access$702((AtomicClock.access$1300(this.this$0) + AtomicClock.access$700()) % 24);
  83.             AtomicClock.access$702(AtomicClock.access$700() < 0 ? 24 + AtomicClock.access$700() : AtomicClock.access$700());
  84.             this.field_7 = "";
  85.             c.access$1500(AtomicClock.access$1400(this.this$0));
  86.          } catch (Exception var2) {
  87.             this.field_4 = true;
  88.          }
  89.       }
  90.  
  91.       if (this.field_4) {
  92.          AtomicClock.access$1200().setText("Failed to connect!");
  93.          this.field_4 = false;
  94.          this.field_2 = new StringBuffer();
  95.          this.field_0 = null;
  96.          this.field_1 = null;
  97.       }
  98.  
  99.       AtomicClock.access$1700(this.this$0).addCommand(AtomicClock.access$1600(this.this$0));
  100.       AtomicClock.access$1800(this.this$0).a();
  101.       this.field_8 = false;
  102.    }
  103.  
  104.    // $FF: renamed from: for () void
  105.    private synchronized void method_1() {
  106.       this.field_8 = true;
  107.  
  108.       try {
  109.          this.notify();
  110.       } catch (Exception var2) {
  111.          this.this$0.a("Application error 4");
  112.       }
  113.  
  114.    }
  115.  
  116.    // $FF: renamed from: if () void
  117.    private void method_2() {
  118.       this.field_8 = false;
  119.       this.field_2 = new StringBuffer();
  120.       this.field_0 = null;
  121.       this.field_1 = null;
  122.    }
  123.  
  124.    // $FF: renamed from: a () void
  125.    private void method_3() {
  126.       this.field_8 = false;
  127.       this.field_3 = false;
  128.       this.field_2 = null;
  129.       this.field_0 = null;
  130.       this.field_1 = null;
  131.    }
  132.  
  133.    // $FF: synthetic method
  134.    static void access$000(AtomicClock$a var0) {
  135.       var0.method_3();
  136.    }
  137.  
  138.    // $FF: synthetic method
  139.    static void access$200(AtomicClock$a var0) {
  140.       var0.method_1();
  141.    }
  142.  
  143.    // $FF: synthetic method
  144.    static boolean access$300(AtomicClock$a var0) {
  145.       return var0.field_8;
  146.    }
  147.  
  148.    // $FF: synthetic method
  149.    static void access$400(AtomicClock$a var0) {
  150.       var0.method_2();
  151.    }
  152. }
  153.